#ifndef  SHOP_H
#define SHOP_H
#include <iostream>
#include <string>
using namespace std;
class Shop
{   public:Shop();
           Shop(int theId,string theName); 
          void SetValue(int theId,string theName);
           Shop * next;
           int GetId();
           string GetName();
    private :
        int id;
        string name; 
        
};

class SuperMark
{
   public :
        SuperMark():head(NULL){}
        void Init();
          void Append()  ;
        void Delete();
        void Query();
   private :
        Shop * head;  
} ;

void SuperMark::Init()
{
    head=new Shop;
    
}
Shop::Shop()
{
    id=0;
    name="";
   
}
Shop::Shop(int theId,string theName)
{
    id=theId;
    name=theName;
}
void Shop::SetValue(int theId,string theName)
{
    id=theId;
    name=theName;
}
int Shop::GetId()
{
    return this->id;
}
string Shop::GetName()
{
    return this->name;
}
void SuperMark::Append()
{   int id;
    string name;
    Shop * sp=head;
    while(sp!=NULL)
    {
        sp=sp->next;
    }
    Shop * temp=new Shop;
    temp->next=NULL;
    cout<<endl;
    cin>>id;
    cin>>name;
    temp->SetValue(id,name);
    sp=temp;
    return;
}
void SuperMark::Query()
{
    Shop* temp;
    temp=head;
    cout<<endl;
    while(temp!=NULL)
      
    {   cout<<temp->GetId();cout<<endl;
        cout<<temp->GetName();
        temp=temp->next;
    }
    return;
    
}
#endif
